<?php $this->layout = 'admin'; ?>
<html>
<body>
<?php if ($admin == 1) { ?>
<table width="111" height="44">
<tr>
        <th>Picture</th>
	<th>Name</th>
	<th>Actions</th>
        <th></th>
  <?php while($l>0){ ?>
  <tr>
      <td width="214"><?php
      $img = $accountsArray[$length-$l]['Accounts']['image'];
      $img = $accountsArray[$length-$l]['Accounts']['image'];
      if($img == null){
          $img = 'eggs.png';
      }
      echo $this->Html->image($img); ?></td>
    <td width="214"><?php echo $accountsArray[$length-$l]['Accounts']['name'] ?></td>
	    <td width="56"><?php echo $this->Html->link('Delete' ,array('action'=> 'delete1' , $accountsArray[$length-$l]['Accounts']['accID'])) ?></td>
		<td width="56"><?php echo $this->Html->link('Edit' ,array('controller' => 'accounts','action'=> 'edit' , $accountsArray[$length-$l]['Accounts']['accID'])) ?></td>
  </tr>
  <?php $l-- ; }?>
</table>
<?php } ?>
</html>